Apparatus for switching an object managing method and a method thereof

ABSTRACT

In a system configuring and executing an application by combining a plurality of components, a method suitable for the type of a component is selected from a plurality of object managing methods, and an object caching part and an object persistence processing part corresponding to the method are included in a component base.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to an object-oriented programming process. Especially, it relates to an object managing apparatus for configuring and executing an application program by combining components, and a method thereof.

[0003] 2. Description of the Related Art

[0004] The application programs (applications) of a business system, etc., are often configured by combining program units called components. At the time of configuring/operating (executing) such an application, the component base offers each component, a second storage access function (for example, a database access function) , a transaction function, a communication function in distributed environments, etc.

[0005] Among these functions, the second storage access function is to access the second storage in accordance with the request from the application, and to write or read the data of a persistence object that is designated by the component. Here, the persistence object indicates the object corresponding to the data in the second storage. This object has a life span as long as that of the data in the second storage.

[0006] Since the frequency of writing to/reading from the second storage is greatly related to the performance of the whole application, the caching mechanism of an object is used many times in order to cut the number of accesses to the second storage. In this mechanism, an object with data that has been read from the second storage in the past, is accumulated in the cache in a memory. In the case that the same data is required to be retrieved, the object in the cache is used.

[0007] However, there is the following problem in the caching process in the above-mentioned conventional component base.

[0008] In the caching process of an object, the validity of the data in a cache becomes important. For example, when an object is registered in a cache and then the application that does not use the cache, modifies the data of the second storage corresponding to the registered object, the data of the object in the cache does not match the data of the second storage.

[0009] In this case, a mechanism for performing a caching process that is limited to one transaction process and invalidating the result of the transaction process when data is modified at the time of the termination of the transaction process is required.

[0010] However, in the case that the data in the second storage is not modified at all, it is guaranteed that the data of the object and the data in the second storage are always the same. Therefore, the object that is registered in the cache, is always effective.

[0011] The caching mechanism possessed by the conventional component base is either the caching mechanism with few effects such that all the applications can be securely actuated or the caching mechanism that is optimized under the application restriction that is imposed on the component base itself. Therefore, there it no alternative to providing a caching mechanism on the application side to materialize the caching strategy suitable for the individual application, thereby increasing the load of application development.

SUMMARY OF THE INVENTION

[0012] It is an object of the present invention to offer an object managing apparatus and the method for providing a caching mechanism suitable for respective applications in a component base, in a system for configuring and executing an application by combining components.

[0013] The object managing apparatus of the present invention is provided with a selecting device and a switching device. The apparatus manages an object that is used by an application program including at least one component, in the component base that is a base for configuring and executing an application program.

[0014] The selecting device selects an object managing method suitable for the type of the component from a plurality of object managing methods that are prepared in advance. In the component base, the switching device switches at least one of an object caching part for caching the persistence object corresponding to the data of an external storage using a specifical gorithm and an object persistence processing part for performing conversion between the data of external storage and the persistence object, with apart corresponding to the selected object managing method.

BRIEF DESCRIPTION OF THE DRAWINGS

[0015]FIG. 1 is a block diagram of the object managing apparatus of the present invention;

[0016]FIG. 2 is a diagram showing the configuration of the first system;

[0017]FIG. 3 is a diagram showing the configuration of the second system;

[0018]FIG. 4 is a diagram showing the configuration of the third system;

[0019]FIG. 5 is a flowchart of the first incorporating process;

[0020]FIG. 6 is a diagram showing the configuration of the fourth system;

[0021]FIG. 7 is a flowchart of the second incorporating process;

[0022]FIG. 8 is a diagram showing the configuration of the fifth system;

[0023]FIG. 9 is a diagram showing the configuration of the sixth system;

[0024]FIG. 10 is a diagram showing the configuration of the seventh system;

[0025]FIG. 11 is a diagram showing the caching part within transaction;

[0026]FIG. 12 is a cache table at the time of the termination of transaction;

[0027]FIG. 13 is a diagram showing parts which perform referring processes;

[0028]FIG. 14 is a diagram showing sequentially processing parts;

[0029]FIG. 15 is a diagram showing the acquisition of the first object;

[0030]FIG. 16 is a diagram showing the writing of data;

[0031]FIG. 17 is a diagram showing the acquisition of the second object;

[0032]FIG. 18 is a diagram showing the caching process of all the data;

[0033]FIG. 19 is a diagram showing parts for selecting data items to be used;

[0034]FIG. 20 is a diagram showing the configuration of the eighth system;

[0035]FIG. 21 shows an example of the template of an object caching part;

[0036]FIG. 22 shows an example of an object persistence processing part;

[0037]FIG. 23 shows an example of a generating program of the object caching part;

[0038]FIG. 24 shows an example of a generating program of the object persistence processing part;

[0039]FIG. 25 shows an example of the object caching part;

[0040]FIG. 26 shows an example of the object persistence processing part;

[0041]FIG. 27 is a diagram showing the caching process of an interface;

[0042]FIG. 28 is a diagram showing the configuration of an information processor; and

[0043]FIG. 29 is a diagram showing recording media.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0044] The following is a detailed explanation of the embodiments of the present invention with reference to the drawings.

[0045]FIG. 1 is a block diagram of the object managing apparatus of the present invention. The object managing apparatus of FIG. 1 is provided with a selecting device 1 and a switching device 2. The apparatus manages an object that is used by an application program including at least one component, in the component base that is a base for configuring and executing the application program.

[0046] The selecting device 1 selects an object managing method suitable for the type of component from a plurality of object managing methods that are prepared in advance. In the component base, the switching device 2 switches at least one of an object caching part for caching the persistence object corresponding to the data of the external storage using a specific algorithm and an object persistence processing part for performing conversion between the data of the external storage and a persistence object, with a part corresponding to the selected object managing method.

[0047] The object managing method expresses the algorithm for managing the object that is used in the system, and includes an accessing method to the data that is stored in the external storage. The external storage corresponds to, for example, the second storage.

[0048] The selecting device 1 sends the information of the selected object managing method to the switching device 2 directly or through a storingunit. The switching device 2 switches at least one of the object caching part and object persistence processing part which are offered by the component base with the part suitable for the type of component, in accordance with the notified object managing method. The object managing apparatus caches the persistence object using the thus-switched part.

[0049] According to such an object managing apparatus, an appropriate object caching part and an appropriate object persistence processing part are automatically incorporated for each type of component, in the component base. Therefore, the caching mechanism suitable for the individual application can be automatically offered.

[0050] For example, the selecting device 1 and switching device 2 of FIG. 1 correspond to a selecting unit 36 and a switching unit 37 of FIG. 2 that are respectively described later.

[0051] In the present embodiment, the object managing method of a caching mechanism, etc., offered by the component base, are automatically switched with the method suitable for the nature of the application. As the nature of the application, the usage, processing method, etc., of the data to be processed by the application are considered. The caching mechanism that is prepared on the application side is no longer required by changing the object managing method in accordance with the application, thereby decreasing the number of processes required for the application development.

[0052]FIG. 2 is a diagram showing the basic configuration of the system of the present embodiment for performing a process of information between a client and a server. The system of FIG. 2 is provided with an application 11, a component base 12, and a second storage 13. The application 11 includes a client application 21 and a component 22. The component 22 includes an interface 23 and a persistence object 24.

[0053] The client application 21 requires the component base 12 to retrieve and store an object through the interface 23 of the component 22.

[0054] The component base 12 is configured, for example, in the memory of a server, and includes an object managing unit 31 and a second storage interface 32. The object managing unit 31 includes an interface 33, an object caching part 34, an object persistence processing part 35, a selecting unit 36, and a switching unit 37.

[0055] The component base 12 is a base for configuring and executing the application 11. The object managing unit 31 retrieves or stores a persistence object 24 corresponding to the data in the second storage 13, in accordance with the request from the application 11. The second storage interface 32 operates as the input/output interface between the object managing unit 31 and second storage 13. The second storage 13 stores data, for example, in a record format.

[0056] The interface 33 regulates a method of storing/acquiring the persistence object 24 by the application 11, and operates as an interface between the interface 23 and object caching part 34. The object caching part 34 reduces the number of accesses to the second storage 13, by caching an object with a specific strategy for each type of object in order to improve the performance. The persistence processing part 35 performs conversion between the data in the second storage 13 and the object.

[0057] The selecting unit 36 selects a method suitable for the type of component 22 from a plurality of object managing methods that are prepared in advance based on the instructions transmitted from a user. The switching unit 37 is provided with the object caching part 34 and object persistence processing part 35 corresponding to the selected object managing method, and it automatically generates a caching mechanism suitable for the component 22. In this way, the object managing method of the object managing unit 31 is switched in accordance with the component 22.

[0058] Since one or more components are generally included in the application 11, the selecting unit 36 selects an appropriate object managing method for each component. The switching unit 37 arranges the object caching part and object persistence processing part corresponding to the selected object managing method, and generates a caching mechanism for each component.

[0059] For example, in the case that the application 11 includes two components, the system like FIG. 3 is configured. The application 11 of FIG. 3 includes components 22 and 25, and the component 25 includes an interface 26 and a persistence object 27.

[0060] In this case, the selecting unit 36 selects the object managing method suitable for each of the components 22 and 25. The switching unit 37 incorporates the object caching parts 34 and 39, and the object persistence processing parts 35 and 40, into the component base 12, for the components 22 and 25, individually. Further, an interface 38 operates as the interface between the interface 26 and object caching part 39 like the interface 33.

[0061] The appropriate caching mechanism is formed for each component, by switching the object caching part and object persistence processing part for each component that is the configuration unit of the application. In this way, the object managing method suitable for the nature of application is realized.

[0062] However, the switching unit 37 need not switch both of the object caching part and object persistence processing part for each component. It can switch only one of them if necessary.

[0063] Also, as for a method of forming a caching mechanism for each component by the selecting unit 36 and switching unit 37, the following two methods are conceivable: the first method of automatically forming an object caching part and an object persistence processing part; the second method of selecting the object caching part and object persistence processing part from a group of parts that are prepared in advance. The first method is mainly used when the application 11 is configured while the second method is mainly used when the application 11 is executed.

[0064]FIG. 4 shows the systembasedon the first method. The switching unit 37 of FIG. 4 holds in advance the templates of the programs of the object caching part 34 and object persistence processing part 35. The selecting unit 36 notifies the switching unit 37 of the selected managing method. The switching unit 37 automatically forms the object caching part 34 and object persistence processing part 35 that result in the notified object managing method, thereby incorporating these parts in the component base 12.

[0065]FIG. 5 is a flowchart of the incorporating process performed by the object managing unit 31 of FIG. 4. Here, assume that a plurality of components to be processed exist on the component base 12.

[0066] First, the selecting unit 36 selects an object managing method for one component on the component base 12 (step S1) Next, the switchingunit 37 forms the program of the object caching part that matches the selected object managing method using a template (step S2), forms the program of the object persistence processing part in accordance with the managing method (step S3), and incorporates the formed parts in the component base (step S4).

[0067] Next, the selecting unit 36 checks whether there is an unprocessed component on the component base 12 (step S5) . If such a component is present, the processes in and after step S1 are repeated. When the obj ect managing methods are selected for all the components, the process terminates.

[0068] By automatically forming the object caching part and object persistence processing part in such a way, these parts need not be prepared in advance. Examples of the program and template of the object caching part and object persistence processing part will be described later.

[0069]FIG. 6 shows the system based on the second method. The object managing unit 31 of FIG. 6 includes a storing unit 41. The selecting unit 36 stores the information that designates the selected object managing method in the storing unit 41. In this way, the object managing method suitable for the component 22 is set in the storing unit 41.

[0070] The switching unit 37 reads the information about the object managing method from the storing unit 41, and selects the parts that result in the established object managing methods from a group of object caching parts 42 and a group of object persistence processing parts 43 that are prepared in advance, thereby incorporating the selected parts in the component base 12.

[0071]FIG. 7 is a flowchart of the incorporating process performed by the object managing unit 31 of FIG. 6. Here, assume that a plurality of components to be processed exist on the component base 12. The processes performed in steps S11, S14 and S15 of FIG. 7 are the same as the processes performed in steps S1, S4, and S5 of FIG. 5.

[0072] When the selecting unit 36 selects an object managing method in step S11, the switchingunit 37 selects the object caching part that matches the selected object managing method from the group of parts 42 (step S12). Then, it selects the object persistence processing part that matches the managing method from the group of parts 43 (step S13), and it performs processes in and after step S14.

[0073] By selecting an object caching part and an object persistence processing part from the groups of parts, in this way, the process of automatically generating a program need not be incorporated. Examples of the programs of the object caching part and object persistence processing part that are prepared in advance will be described later.

[0074] The selecting unit 36 can also select the object managing method designated by an application 11 other than the object managing method designated by a user. FIG. 8 shows such a system. In FIG. 8, the client application 21 designates the object managing method suitable for the component 22. The selecting unit 36 selects the designated object managing method upon receipt of the designation. According to this selecting method, a user need not designate an object managing method for each component.

[0075] Further, the selecting unit 36 causes a user to input the type of application use, and the user can select an appropriate object managing method based on the input information. FIG. 9 shows such a system. The selecting unit 36 of FIG. 9 includes an input unit 51, an inference unit 52, and an inference rule storing unit 53.

[0076] The inference rule storing unit 53 holds such an inference rule for infering an appropriate object managing method. The input unit 51 inputs the usage of the component 22 designated by a user. The inference unit 52 determines the object managing method suitable for the component 22 from the type of use that is input in accordance with the inference rule of the inference rule storing unit 53. According to this selecting method, a user only has to designate the type of use of the component, resulting in that the user does not need to designate the object managing method. In the inference rule storing unit 53, an inference rule like the following is stored. If usage=master retrieval then

[0077] object caching part=part only performing a reference process

[0078] object persistence processing part=part for selecting data item to be used else if usage=online slip process then

[0079] object caching part=intra-transaction caching part

[0080] object persistence processing part=all data item processing part else if usage=batch slip process then

[0081] object caching part=sequentially processing part

[0082] object persistence processing part=part for selecting data item to be used.

[0083] Here, the master retrieval process corresponds to the process of reading the original data from the second storage 13. The online slip process and batch slip process correspond to the reference/update process and other processes of the slip data in a business system.

[0084] The part performing only a reference process represents the object caching part prepared for the application that does not update but only refers to the data of an object. The intra-transaction caching part represents the object caching part that is prepared for the application for updating the data of an object. The sequentially processing part represents the object caching part prepared for the application that sequentially processes a plurality of objects that are returned as the retrieval result.

[0085] The part for selecting data items to be used represents the object persistence processing part that writes/reads only the designated items among the data of the object to/from the second storage 13. The part for processing all the data items represents the object persistence processing part that writes/reads all the data items of the object to/from the second storage 13. Examples of these parts will be explained later.

[0086] The switching unit 37 can also automatically perform a switching process in accordance with the predetermined schedule, instead of switching based on the object managing method that is selected by the selecting unit 36. FIG. 10 shows such a system. The object managing unit 31 of FIG. 10 includes a timer 61, aswitching schedule defining unit 62, and a switching schedule storing unit 63, in place of the selecting unit 36.

[0087] The switching schedule defining unit 62 prepares the switching schedule information that defines when and which object managing method should be adopted (when and which object caching part and object persistence processing part should be used) . Then the unit 62 stores the information in the switching schedule storing unit 63. Further, the timer 61 prepares time information to be output to the switching unit 37. The switching unit 37 switches between the object caching part and object persistence processing part in accordance with the switching schedule informationof the switching schedule storing unit 63, with reference to the time information transmitted from the timer 61.

[0088] For example, in the case of such a system that an online slip process is performed in the day while a batch slip process is performed in the night, the switching schedule that uses the part that differs for day and night, is prepared in advance. Thus, the switching performed in accordance with the switching schedule information does not require the selection of an object managing method at the time of the operation of application.

[0089] Next, examples of the object caching part are explained in reference to FIGS. 11 to 18.

[0090]FIG. 11 shows an example of the intra-transaction caching part. An object caching part 71 of FIG. 11 is prepared for the component that updates the data of the object like the online slip processing, and it is provided with a cache table that caches the objects for each transaction. Then, the objects are registered in the cache table after the transaction starts, and the cache table is cleared at the time of the termination of transaction.

[0091] Here, the object caching part 71 holds cache tables 72, 73, and 74 that correspond to transactions A, B, and C, respectively. The persistence objects are registered in each cache table together with identification information. Among these objects, persistence objects 75, 76, and 77 that correspond to identification information ID1, ID2, and ID3, are registered in a cache table 74 to be used for a transaction C.

[0092] After that, when the transaction C terminates by commitment or rollback, the object caching part 71 clears the cache table 74 as shown in FIG. 12.

[0093] According to such an object caching part, the persistence object is cached for each transaction. Since the cache is released at the time of the termination of a transaction, processes are always carried out based on the latest data.

[0094]FIG. 13 shows an example of the part performing only a reference process. An object caching part 82 of FIG. 13 is prepared for the component that only refers to the data of an object like a master retrieval process, and has a cache table common to all the transactions. Even if one transaction terminates, the cache table is not cleared, so that the other transaction can use objects registered in the same cache table.

[0095] Here, persistence objects 75, 76, and 77 are registered in the cache table 82 held by an object cashing part 81 similar to the cache table 74 of FIG. 11. Then, even if a transaction C terminates, a cache table 82 is not cleared, and transactions A and B can refer to these persistence objects.

[0096] According to such an object caching part, the persistence object is held in the cache common to a plurality of transactions, so that these transactions can use the same cache.

[0097]FIG. 14 shows an example of a sequentially processing part. An object caching part 91 of FIG. 14 is prepared for the component that sequentially processes those objects, when a set of objects is returned as the retrieval result of the object like the batch slip process. When the application 11 tries to acquire the object corresponding to the next element in the set, the data of the object that has been used up to the immediately preceding time point, is written into the second storage 13, and the data of the next element is set to the object, thereby returning the set data to the application 11.

[0098] When a retrieval request is made by the application 11, the object caching part 91 acquires a set of data from the second storage 13. Then, the part 91 forms a set object 92 that indicates a corresponding set of objects, and returns it to the application 11. At this time, the second storage interface 32 of FIG. 2 acquires the head part or whole part of a set of data (data D1, D2, and D3) from the second storage 13, thereby temporarily storing the data.

[0099] Next, the application 11 requests the acquisition of the first object of the set object 92 as shown in FIG. 15. At this time, the object caching unit 91 sets the first data D1 in a persistence object 93 from the second storage interface 32, andreturns the persistence object 93 to the application 11.

[0100] Next, the application 11 requests the acquisition of the next object of the set object 92 as shown in FIG. 16. At this time, the object caching part 91 writes the data of the persistence object 93 in the second storage 13. Then, as shown in FIG. 17, the second data D2 from the second storage interface 32 is set to the persistence object 93, and returns the persistence object 93 to the application 11.

[0101] After that, the same processes are repeated. When all the data of the second storage interface 32 are set to the persistence object 93, the next partial data is acquired from the second storage 13. When all the data of a data set are acquired, the processes terminate.

[0102] According to such an object caching part, the data set can be passed to the application by using one persistence object repeatedly. Therefore, the number of required objects is minimized, so that the usage efficiency of the resources of a component base 12 improves.

[0103]FIG. 18 shows the object caching part that caches all the data of the second storage 13. An object caching part 101 of FIG. 18 is prepared for the component that only refers to the data of the object, and is used in the case that a small amount of data is present in the second storage 13 that corresponds to the object to be referred to.

[0104] Here, all data D1, D2, and D3 in the second storage 13 are converted into persistence objects 103, 104, and 105, respectively, and the converted data are registered in a cache table 102. When a retrieval request is made by the application 11, the data can be immediately returned using the object caching part, so that the processes are performed at high speed.

[0105] Next, FIG. 19 shows an example of a selecting part selecting data items to be used that corresponds to one of the object persistence processing parts. A storing unit storing data items to be used 111 and an instructing unit instructing data items to be used 112 are included in the storing unit 41 and the selecting unit 36 of FIG. 6, respectively. The instructing unit instructing data items to be used 112 designates data items of the object to be used for each type of component, and stores the information in the storing unit storing data items to be used 111. The data items of the object correspond to, for example, the fields (attributes) of a record of the second storage 13.

[0106] When the object caching part 34 registers a persistence object 114 in a cache table 113, an object persistence processing part 115 refers to the storing unit storing data items to be used 111, reads only the designated data item from the second storage 13, and writes the data item in the second storage 13. Further, when the object caching part 34 writes the data of the persistence object 114 in the second storage 13, the object persistence processing part 115 writes only the designated data items in the second storage 13.

[0107] Here, each piece of data inside the second storage 13 is composed of three attributes of A1, A2, and A3. The object caching part 34 caches the data corresponding to identification information ID1.

[0108] For example, in the case that these three attributes are designated as data items in the storing unit storing data items to be used 111, the object persistence processing part 115 reads three attributes “aaa”, “x”, and “1000” corresponding to the ID1 from the second storage 13. Then, the part 115 sets the thus-read attributes to the corresponding attributes of the persistence object 114.

[0109] In the case that only the attribute A1 is designated as a data item in the storing unit storing data items to be used 111, the object persistence processing part 115 reads only “aaa” that corresponds to the attribute A1 of the ID1 from the second storage 13, and sets “aaa” to the attribute A1 of the persistence object 114.

[0110] Using such an object persistence processing part, the data of an object can be selected so as to be read or written, with regard to the required data items. Therefore, the frequency of the data transfer between the second storage 13 and component base 12 is reduced, so that the processes are performed at high speed.

[0111] Next, concrete examples of the component and component base are explained referring to FIGS. 20 to 27.

[0112]FIG. 20 shows a model of EJB (Enterprise JavaBeans) (trademark) corresponding to the system of FIG. 3. Here, Entity Bean corresponds to the persistence object while an EJB container 121 corresponds to the component base 12.

[0113] The component 22 includes an EJBObject 122 and an Entity Bean 123. The component 25 includes an EJBObject 124 and an Entity Bean 125. The EJBObject 122 and EJBObject 124 are such interfaces that the client application 21 accesses Entity Beans 123 and 125.

[0114] The interfaces 23 and 33 compose the interface called EJB Home, and notifies the object caching part 34 of the retrieval request, etc., made by the client application 21. The processes performed by the interfaces 26 and 38 are the same.

[0115] The object caching part 34 caches the Entity Bean with a specified strategy, and the object persistence processing part 35 performs conversion between the data in the second storage 13 and the Entity Bean. In this way, a caching mechanism of the Entity Bean is realized.

[0116] When the switching unit 37 automatically generates the program as shown in FIG. 4, it uses, for example, the templates like FIGS. 21 and 22. FIGS. 21 and 22 shows examples of the templates of the object caching part and object persistence processing part, respectively.

[0117] In FIG. 21, “$$Bean$$” represents the class name of the Entity Bean, while “$$PrimaryKey$$” represents the class name of the key of the Entity Bean.

[0118] In FIG. 22, “$$BeanFieldColumns$$” represents the sequence of the column names of the table in which the data of the Entity Bean is stored. “$$Table$$” represents the table name of the table in which the data of the Entity Bean is stored. “$$PKFieldColumns$$” represents the column name corresponding to the key field of the Entity Bean.

[0119] In this template, the statement between “//$$ foreach $$BeanField$$” and “//$$ end foreach” is repeatedly developed the number of times equivalent to the number of fields in the Entity Bean. “$$Name$$” represents the field name of the Entity Bean. “$$Type$$” represents the type of the field, while “$$Count$$” represents the repetition number.

[0120] For example, from the template of FIG. 21, the program of the object caching part like FIG. 23 is generated. “$$Bean$$” and “$$PrimaryKey$$” are replaced with “OrderBean” and “OrderBeanPrimaryKey”, respectively.

[0121] Further, from the template of FIG. 22, for example, the program of the object persistence processing part like FIG. 24 is generated. In the program of FIG. 24, “$$Bean$$” is replaced with “OrderBean”, and “$$BeanFieldColumns$$” is replaced with “ID, PRODUCT, QUANTITY”.

[0122] Further, “$$Table$$” and “$$PKFieldColumns$$” are replaced with “ORDERTABLE” and “ID”, respectively.

[0123] “ORDERTABLE” is the table name of the table for storing the data of OrderBean that is an Entity Bean. “ID”, “PRODUCT” and “QUANTITY” are the column names of this table. Among these, “ID” corresponds to the key field of OrderBean.

[0124] Further, the part from “//$$ foreach $$BeanField$$” to “//$$ end foreach” is replaced with the statement that sets the data to the fields of id, product, and quantity of OrderBean.

[0125] In the case that the switching unit 37 switches the part group shown in FIG. 6, for example, the parts like FIGS. 21 and 22 are prepared in advance. FIGS. 25 and 26 show examples of the programs of the object caching part and object persistence processing part, respectively.

[0126] The object caching part of FIG. 25 is realized without relying on the type of Entity Bean to be managed. However, the object persistence processing part of FIG. 26 performs conversion between the data of the second storage 13 and the data of the Entity Bean based on the object (ClassDef, FieldDef, etc.) that represents the information of the Entity Bean (name, type, etc. of the field).

[0127] Also, inthe systemof FIG. 20, the object caching part can manage not only the Entity Bean but also EJBObj ect related to the Entity Bean in accordance with the selected object managing method. FIG. 27 shows such a caching process.

[0128] When an object caching part 131 of FIG. 27 registers the Entity Bean in a cache table 132, it also registers EJBObject corresponding to the Entity Bean. Here, an EJBObject 133 and an Entity Bean 134 are registered corresponding to the ID1, while an EJBObject 135 and an Entity Bean 136 are registered corresponding to ID2. Further, an EJBObject 137 and an Entity Bean 138 are registered corresponding to ID3.

[0129] According to such a mechanism, not only the Entity Bean but also the EJBObject can be re-used in accordance with the selected object managing method. In this way, it becomes possible to pass the corresponding EJBObject to the application 11 together with the Entity Bean. Therefore, the application 11 can immediately access the Entity Bean through the EJBObject.

[0130] Furthermore, the object managing method of the present embodiment can be applied to not only the above-mentioned EJB, but also to the component base of an arbitrary system such as CORBA (common object request broker architecture), etc.

[0131] The client and server that are included in the system of the present embodiment can be configured using the information processor (computer) as shown in FIG. 28. The information processor of FIG. 28 is provided with a CPU (central processing unit) 141, a memory 142, an input apparatus 143, an output unit 144, an external storage 145, amediumdriving apparatus 146, and a network connecting apparatus 147, which are connected by a bus 148.

[0132] The memory 142 includes, for example, a ROM (read only memory), a RAM (random access memory), etc., and stores the program and data that are used for the processes. The CPU 141 performs the required processes by executing the program using the memory 142.

[0133] In this case, the application 11, component base 12, client application 21, component 22, interfaces 23 and 33, persistence object 24, object managing unit 31, second storage interface 32, object caching part 34, object persistence processing part 35, selecting unit 36, switching unit 37 of FIG. 2, and timer 61 and switching schedule defining unit 62 of FIG. 10 are stored in the memory 142 as programs. The memory 142 holds the storing unit 41 of FIG. 6, the inference rule storing unit 53 of FIG. 9, the switching schedule storing unit 63 of FIG. 10, the cache table, etc.

[0134] The input apparatus 143 includes a keyboard, a pointing device, a touch panel, etc., and is used for the input of the indications or information transmitted from an operator (user or the manager of a server). The output unit 144 includes, for example, a display, a printer, a loud speaker, etc., and is used for the output of the inquiry and the processing result to an operator.

[0135] The external storage 145 includes, for example, a magnetic disk apparatus, an optical disk apparatus, a magneto-optical disk apparatus, a tape apparatus, etc., and is used as the second storage 13 of FIG. 2. The information processor stores the above-mentioned program and data in the external storage 145, and uses them by loading them into the memory 142 if necessary.

[0136] The medium driving apparatus 146 drives the portable recording medium 149, and accesses the recorded contents. As the portable recording medium 149, an arbitrary computer-readable recording medium such as a memory card, a floppy disk, a CD-ROM (compact disk read only memory), an optical disk, a magneto-optical disk, etc., are used. An operator stores the above-mentioned program and data in the portable recording medium 149, and uses them by loading them into the memory 142, if necessary.

[0137] The network connecting apparatus 147 is connected with an arbitrary communication network such as a LAN (local area network), etc., and performs the data conversion in association with communication. Further, the information processor receives the above-mentioned program and data from the other apparatuses through the network connecting apparatus 147, and uses them by loading them into the memory 142, if necessary.

[0138]FIG. 29 shows computer-readable recording media that can supply a program and data to the information processor of FIG. 28. The program and data that are stored in the portable storing medium 149 or a database 151 of a server 150 are loaded into the memory 142. At this time, the server 150 generates a propagating signal propagating the program and data, and transmits the signal to the information processor through an arbitrary transmission medium on the network.

[0139] According to the present invention, in a system configuring and operating an application by combining components, a caching mechanism suitable for each application is automatically provided by a component base. Thus, a caching mechanism is not required to be provided on an application side, and accordingly the application is effectively developed. 

What is claimed is:
 1. An object managing apparatus managing an object used by an application program including one or more components, in a component base that is a base for configuring and executing the application program, comprising: a selecting device selecting an object managing method suitable for a type of a component, from a plurality of object managing methods that are prepared in advance; and a switching device switching in the component base, at least one of an object caching part that caches a persistence object corresponding to data of an external storage using a specified algorithm and an object persistence processing part performing conversion between the data of the external storage and the persistence object, with a part corresponding to the selected object managing method.
 2. The object managing apparatus according to claim 1 , wherein the switching device automatically generates a program of the part corresponding to the selected object managing method, and incorporates the program in the object managing apparatus.
 3. The object managing apparatus according to claim 1 , wherein the switching device selects the part corresponding to the selected object managing method from a part group that is prepared in advance, and incorporates the selected part in the object managing apparatus.
 4. The object managing apparatus according to claim 1 , wherein the selecting device selects the object managing method that is designated by a user.
 5. The object managing apparatus according to claim 1 , wherein the selecting apparatus selects the object managing method that is designated by the application program.
 6. The object managing apparatus according to claim 1 , wherein the selecting device includes an input device inputting usage information of the component, and selects the object managing method based on the usage information.
 7. The object managing apparatus according to claim 1 , wherein the switching device has a cache table caching an object for each transaction, and uses an object caching part that registers an object in the cache table after a transaction starts, and clears the cache table when the transaction terminates, as the part corresponding to the selected object managing method.
 8. The object managing apparatus according to claim 1 , wherein the switching apparatus has a cache table common to all transactions, and uses an object caching part which does not clear the cache table but makes the other transaction use an object on the cache table when one transaction terminates, as the part corresponding to the selected object managing method.
 9. The object managing apparatus according to claim 1 , wherein the switching device uses an object caching part that writes data of an object being used by the application program in the external storage, and sets next data to the object being used, thereby returning the data to the application program when the application program requests acquisition of an object to be processed, as the part corresponding to the selected object managing method.
 10. The object managing apparatus according to claim 1 , wherein the switching device uses the object caching part that caches all data of the external storage in advance before the application program requests an object to be processed, as the part corresponding to the selected object managing method.
 11. The object managing apparatus according to claim 1 , wherein the switching device uses an object caching part that registers an interface related to the persistence object, and reuses the interface together with the persistence object, as the part corresponding to the selected object managing method.
 12. The object managing apparatus according to claim 1 , further comprising a designating device designating one or more data items suitable for the type of the component, wherein the switching device uses an object persistence processing part that performs conversion between data of the external storage and the persistence object regarding designated data items of the persistence object, as the part corresponding to the selected object managing method.
 13. An object managing apparatus managing an object used by an application program including one or more components, in a component base that is a base for configuring and executing the application program, comprising: a storing device storing schedule information for selecting an object managing method suitable for a type of a component, from a plurality of object managing methods that are prepared in advance; and a switching device switching in the component base, at least one of an object caching part that caches a persistence object corresponding to data of an external storage using a specified algorithm and an object persistence processing part performing conversion between data of the external storage and the persistence object, with a part corresponding to the suitable object managing method based on the schedule information.
 14. A computer readable recording medium storing a program for a computer that manages an object used by an application program including one or more components, in a component base that is a base for configuring and executing the application program, the stored program causes the computer to perform: selecting an object managing method suitable for a type of a component, from a plurality of object managing methods that are prepared in advance; and switching in the component base, at least one of an object caching part that caches a persistence object corresponding to data of an external storage using a specified algorithm and an object persistence processing part performing conversion between data of the external storage and the persistence object, with a part corresponding to the selected object managing method.
 15. A managing method managing an object used by an application program including one or more components, in a component base that is a base for configuring and executing the application program, comprising: preparing a plurality of object managing methods in advance; selecting an object managing method suitable for a type of a component, from the plurality of object managing methods; automatically switching in the component base, at least one of an object caching part that caches a persistence object corresponding to data of an external storage using a specified algorithm and an object persistence processing part performing conversion between data of the external storage and the persistence object, with a part corresponding to the selected object managing method; and managing an object used by the application program using the part corresponding to the selected object managing method.
 16. A propagating signal propagating a program for a computer managing an object used by an application program including one or more components in a component base that is a base for configuring and executing the application program, to the computer, the propagated program causes the computer to perform: selecting an object managing method suitable for a type of a component, from a plurality of object managing methods; and switching in the component base, at least one of an object caching part that caches a persistence object corresponding to data of an external storage using a specified algorithm and an object persistence processing part performing conversion between data of the external storage and the persistence object, with a part corresponding to the selected object managing method.
 17. An object managing apparatus managing an object used by an application program including one or more components, in a component base that is a base for configuring and executing the application program, comprising: selecting means for selecting an object managing method suitable for a type of a component, from a plurality of object managing methods that are prepared in advance; and switching means for switching in the component base, at least one of an object caching part that caches a persistence object corresponding to data of an external storage using a specified algorithm and an object persistence processing part performing conversion between the data of the external storage and the persistence object, with a part corresponding to the selected object managing method. 